Skip to content

Some rustc_query_system cleanups#152023

Merged
rust-bors[bot] merged 4 commits intorust-lang:mainfrom
nnethercote:rm-Value
Feb 5, 2026
Merged

Some rustc_query_system cleanups#152023
rust-bors[bot] merged 4 commits intorust-lang:mainfrom
nnethercote:rm-Value

Conversation

@nnethercote
Copy link
Contributor

Small improvements I found while looking closely at rustc_query_system. Best reviewed one commit at a time.

r? @cjgillot

@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 3, 2026
@rust-bors

This comment has been minimized.

@cjgillot
Copy link
Contributor

cjgillot commented Feb 3, 2026

r=me with Zoxc's comment resolved

@rustbot

This comment has been minimized.

@nnethercote
Copy link
Contributor Author

I rebased over #152041, and added a new commit to move rustc_middle::values to rustc_middle::query::values.

@nnethercote
Copy link
Contributor Author

@bors r=cjgillot

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 3, 2026

📌 Commit 461e5ab has been approved by cjgillot

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 3, 2026
@rust-log-analyzer

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Feb 4, 2026
…uwer

Rollup of 5 pull requests

Successful merges:

 - #151893 (Move the query list into a new `rustc_middle::queries` module)
 - #152060 (ci: Optimize loongarch64-linux dist builders)
 - #151993 (Add uv to the list of possible python runners)
 - #152047 (Convert to inline diagnostics in `rustc_interface`)
 - #152053 (Avoid semicolon suggestion when tail expr is error)

Failed merges:

 - #152023 (Some `rustc_query_system` cleanups)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 4, 2026
Some `rustc_query_system` cleanups

Small improvements I found while looking closely at `rustc_query_system`. Best reviewed one commit at a time.

r? @cjgillot
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 4, 2026
Some `rustc_query_system` cleanups

Small improvements I found while looking closely at `rustc_query_system`. Best reviewed one commit at a time.

r? @cjgillot
@rust-bors rust-bors bot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Feb 4, 2026
@rust-bors

This comment has been minimized.

@rust-bors rust-bors bot removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Feb 4, 2026
It's a tiny module with one trait and a default impl. It's not used in
`rustc_query_system`; all uses and non-default impls are in
`rustc_middle` and `rustc_query_impl`.

This commit moves it into `rustc_middle`, which makes things simpler
overall.
It's a better place for it, because it relates to queries.
They are defined in `rustc_query_system` but used in `rustc_query_impl`.
This is very much *not* how things are supposed to be done; I suspect
someone got lazy and took a shortcut at some point.

This commit moves the errors into `rustc_query_impl`. This requires more
lines of code to give `rustc_query_impl` an errors module, but it's
worthwhile to do things in the normal way instead of a weird exceptional
way.
It's unused. And it's nice to remove this function that didn't behave
like normal `clear` does, as the comment explained.
@rustbot
Copy link
Collaborator

rustbot commented Feb 4, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@nnethercote
Copy link
Contributor Author

I rebased.

@bors r+ rollup

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 4, 2026

📌 Commit 0420a2e has been approved by nnethercote

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 4, 2026
Zalathar added a commit to Zalathar/rust that referenced this pull request Feb 5, 2026
Some `rustc_query_system` cleanups

Small improvements I found while looking closely at `rustc_query_system`. Best reviewed one commit at a time.

r? @cjgillot
rust-bors bot pushed a commit that referenced this pull request Feb 5, 2026
Rollup of 15 pull requests

Successful merges:

 - #151431 (Add new unstable attribute: `#[export_visibility = ...]`.)
 - #146900 (Add avr_target_feature)
 - #152033 (Rename trait `DepNodeParams` to `DepNodeKey`)
 - #152142 (Convert to inline diagnostics in `rustc_hir_typeck`)
 - #152020 (Remove dummy loads on offload codegen)
 - #152023 (Some `rustc_query_system` cleanups)
 - #152068 (Convert to inline diagnostics in `rustc_resolve`)
 - #152081 (Port depgraph testing attributes to parser)
 - #152090 (Port reexport_test_harness_main to attr parser)
 - #152105 (Convert to inline diagnostics in `rustc_ast_lowering`)
 - #152108 (Convert to inline diagnostics in `rustc_expand`)
 - #152114 (Convert to inline diagnostics in `rustc_mir_transform`)
 - #152115 (Convert to inline diagnostics in `rustc_metadata`)
 - #152116 (Remove rustdoc GUI flaky test)
 - #152128 (Adopt matches-logical-or-141497.rs to LLVM HEAD)

Failed merges:

 - #152070 (Convert to inline diagnostics in `rustc_pattern_analysis`)
 - #152106 (Convert to inline diagnostics in `rustc_ast_passes`)
 - #152109 (Convert to inline diagnostics in `rustc_errors`)
 - #152117 (Convert to inline diagnostics in `rustc_trait_selection`)
 - #152118 (Convert to inline diagnostics in `rustc_codegen_ssa`)
 - #152119 (Convert to inline diagnostics in `rustc_middle`)
 - #152126 (Convert to inline diagnostics in `rustc_mir_build`)
 - #152131 (Port rustc_no_implicit_bounds attribute to parser.)
Zalathar added a commit to Zalathar/rust that referenced this pull request Feb 5, 2026
Some `rustc_query_system` cleanups

Small improvements I found while looking closely at `rustc_query_system`. Best reviewed one commit at a time.

r? @cjgillot
Zalathar added a commit to Zalathar/rust that referenced this pull request Feb 5, 2026
Some `rustc_query_system` cleanups

Small improvements I found while looking closely at `rustc_query_system`. Best reviewed one commit at a time.

r? @cjgillot
rust-bors bot pushed a commit that referenced this pull request Feb 5, 2026
Rollup of 19 pull requests

Successful merges:

 - #146900 (Add avr_target_feature)
 - #150379 (Return `ExitCode` from `rustc_driver::main` instead of calling `process::exit`)
 - #152033 (Rename trait `DepNodeParams` to `DepNodeKey`)
 - #152142 (Convert to inline diagnostics in `rustc_hir_typeck`)
 - #152145 (Disable flaky test `oneshot::recv_timeout_before_send`)
 - #152020 (Remove dummy loads on offload codegen)
 - #152023 (Some `rustc_query_system` cleanups)
 - #152068 (Convert to inline diagnostics in `rustc_resolve`)
 - #152081 (Port depgraph testing attributes to parser)
 - #152090 (Port reexport_test_harness_main to attr parser)
 - #152105 (Convert to inline diagnostics in `rustc_ast_lowering`)
 - #152108 (Convert to inline diagnostics in `rustc_expand`)
 - #152110 (Fix incorrect RSS on systems with non-4K page size)
 - #152111 (bootstrap: exclude hexagon-unknown-qurt from llvm-libunwind default)
 - #152114 (Convert to inline diagnostics in `rustc_mir_transform`)
 - #152115 (Convert to inline diagnostics in `rustc_metadata`)
 - #152116 (Remove rustdoc GUI flaky test)
 - #152118 (Convert to inline diagnostics in `rustc_codegen_ssa`)
 - #152128 (Adopt matches-logical-or-141497.rs to LLVM HEAD)

Failed merges:

 - #152070 (Convert to inline diagnostics in `rustc_pattern_analysis`)
 - #152106 (Convert to inline diagnostics in `rustc_ast_passes`)
 - #152109 (Convert to inline diagnostics in `rustc_errors`)
 - #152117 (Convert to inline diagnostics in `rustc_trait_selection`)
 - #152119 (Convert to inline diagnostics in `rustc_middle`)
 - #152126 (Convert to inline diagnostics in `rustc_mir_build`)
 - #152131 (Port rustc_no_implicit_bounds attribute to parser.)
rust-bors bot pushed a commit that referenced this pull request Feb 5, 2026
…uwer

Rollup of 18 pull requests

Successful merges:

 - #150379 (Return `ExitCode` from `rustc_driver::main` instead of calling `process::exit`)
 - #152033 (Rename trait `DepNodeParams` to `DepNodeKey`)
 - #152142 (Convert to inline diagnostics in `rustc_hir_typeck`)
 - #152145 (Disable flaky test `oneshot::recv_timeout_before_send`)
 - #152020 (Remove dummy loads on offload codegen)
 - #152023 (Some `rustc_query_system` cleanups)
 - #152068 (Convert to inline diagnostics in `rustc_resolve`)
 - #152081 (Port depgraph testing attributes to parser)
 - #152090 (Port reexport_test_harness_main to attr parser)
 - #152105 (Convert to inline diagnostics in `rustc_ast_lowering`)
 - #152108 (Convert to inline diagnostics in `rustc_expand`)
 - #152110 (Fix incorrect RSS on systems with non-4K page size)
 - #152111 (bootstrap: exclude hexagon-unknown-qurt from llvm-libunwind default)
 - #152114 (Convert to inline diagnostics in `rustc_mir_transform`)
 - #152115 (Convert to inline diagnostics in `rustc_metadata`)
 - #152116 (Remove rustdoc GUI flaky test)
 - #152118 (Convert to inline diagnostics in `rustc_codegen_ssa`)
 - #152128 (Adopt matches-logical-or-141497.rs to LLVM HEAD)

Failed merges:

 - #152070 (Convert to inline diagnostics in `rustc_pattern_analysis`)
 - #152106 (Convert to inline diagnostics in `rustc_ast_passes`)
 - #152109 (Convert to inline diagnostics in `rustc_errors`)
 - #152117 (Convert to inline diagnostics in `rustc_trait_selection`)
 - #152119 (Convert to inline diagnostics in `rustc_middle`)
 - #152126 (Convert to inline diagnostics in `rustc_mir_build`)
 - #152131 (Port rustc_no_implicit_bounds attribute to parser.)
@rust-bors rust-bors bot merged commit cf2ea13 into rust-lang:main Feb 5, 2026
11 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Feb 5, 2026
rust-timer added a commit that referenced this pull request Feb 5, 2026
Rollup merge of #152023 - nnethercote:rm-Value, r=nnethercote

Some `rustc_query_system` cleanups

Small improvements I found while looking closely at `rustc_query_system`. Best reviewed one commit at a time.

r? @cjgillot
@nnethercote nnethercote deleted the rm-Value branch February 5, 2026 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants